#ifndef __LAND_PLAYER_EVENT_H__
#define __LAND_PLAYER_EVENT_H__

#include "Expand/Events.h"

using namespace PocketSurvival;

namespace Economy
{
    class EconomyLand;

    class LandPlayerEvent : public IPlayerEvent, public IInventoryEvent, public IInventoryOpenEvent
    {
    private:
        EconomyLand *m_economyLand;

    private:
        bool playerEditBlockEvent(std::shared_ptr<PlayerData> playerData, const Point3& point);

    public:
        LandPlayerEvent(EconomyLand * economyLand);
        virtual bool playerPlaceBlock(ComponentPlayer *componentPlayer, const Point3 &point, int32_t placeBlockValue) override;
        virtual bool playerBreakBlock(ComponentPlayer *componentPlayer, const Point3 &point, int32_t digBlockValue, int32_t toolLevel) override;

        virtual bool openPointInventory(std::shared_ptr<PlayerData> playerData, const Point3 &point, IInventory *inventory) override;
        virtual bool playerHandleMoveItem(std::shared_ptr<PlayerData> playerData, IInventory *sourceInventory, uint32_t sourceSlotIndex, IInventory *targetInventory, int32_t targetSlotIndex, uint32_t count) override;
        virtual bool playerHandleDragDrop(std::shared_ptr<PlayerData> playerData, IInventory *sourceInventory, uint32_t sourceSlotIndex, DragMode dragMode, IInventory *targetInventory, uint32_t targetSlotIndex, bool processingOnly) override;
        virtual bool playerDrapDrop(ComponentPlayer *componentPlayer, const Vector3 &dropVelocity, IInventory *inventory, uint32_t slotIndex, uint32_t count) override;
    };

    inline LandPlayerEvent::LandPlayerEvent(EconomyLand *land) : m_economyLand(land) {}

} // namespace BedWars

#endif
